

#include "input.h"


void getInput()
{
        Uint8* key;

        key = SDL_GetKeyState(NULL);



            if (  key[SDLK_DOWN] && menu.choix <4  ) (menu.choix)++;
            if (  key[SDLK_UP] && menu.choix >0  )  (menu.choix)--;


        SDL_PumpEvents();
        if ( key[SDLK_RIGHT] && map.x[0]<= map.background[0]->w-SCREEN_WIDTH   &&   (player.x+PLAYER_HEIGTH) >= SCREEN_WIDTH/2   )
           {
              map.x[0]+=SPEED_SCROLLING_1;
              map.x[1]+=SPEED_SCROLLING_2;
           }


        if (key[SDLK_ESCAPE]) exit(0);

        if ( map.x[0] > 1000 && key[SDLK_RIGHT]  )
        {
          ( obs.x[0] )-=3;;
        }




}

